<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="net.board.db.*" %>
<%@ page import="java.util.*"%>

<%
	BoardBean board = (BoardBean)request.getAttribute("boarddata");
	List boardList=(List)request.getAttribute("boardlist");
	int number=((Integer)request.getAttribute("number")).intValue();
	String Mem_Nick = (String)session.getAttribute("Mem_Nick");
	System.out.println("q&a접속 숫자(3):"+number);
	System.out.println("q&a접속 아이디(3):"+Mem_Nick);
%>

<html>
<head>
	<title>qna_board_view</title>
<style type="text/css">
a:link, a:visited, a:active{color: black; text-decoration:none;}
</style>
<style>
#maindiv{margin: 0 auto; width:700px; height:350px; border:1px solid #e6e6e6; }
</style>
</head>
<body>
<!-- 게시판 수정 -->
<%
System.out.println("qna_board_view");

%>

<div id="maindiv">
<table cellpadding="0" cellspacing="0" width="670" align="center">
	<tr>
		<td height="10">
		
		</td>
	</tr>
	
	<tr>
		<td valign="middle" align="left" style="font-family:16px; vertical-align: middle">
		<img src="/KOMORIUTA/photo/img/Cm_Free_Read_1.png" style="vertical-align: bottom;">&nbsp;<%=board.getQNA_SUBJECT()%>
		</td>
		<td valign="middle" align="right">
		<img src="/KOMORIUTA/photo/img/Cm_Free_Read_2.png" style="vertical-align: bottom;">&nbsp;<%=board.getQNA_DATE() %>
		
		</td>
	</tr>
	<tr height="30">
		<td colspan="2">
		<div id="underdiv" ></div>
		<div id="underdiv2"></div>
		</td>
	</tr>	
	
	<tr>
		
		<td style="font-family:MS Mincho; font-size:15">
			<table border=0 width=490 height=250 style="table-layout:auto;">
				<tr>
					<td valign="top">
					<b><%=board.getQNA_NICK() %></b>
					</td>
				</tr>
				<tr>
					<td valign=top>
					<%=board.getQNA_CONTENT() %>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	
	<tr bgcolor="cccccc">
		<td colspan="2" style="height:1px;"></td>
	</tr>
	
	<tr>
		
		<td>
		<%if(!(board.getQNA_FILE()==null)){ %>
		<a href="./boardupload/<%=board.getQNA_FILE()%>">
			<%=board.getQNA_FILE() %>
		</a>
		<%}if((board.getQNA_FILE()==null)){ %>
		<img alt="" src="<%=request.getContextPath() %>/board/images/attach.png">
		<%}else{%>
		&nbsp;
		<%} %>
		</td>
	</tr>
	
	<tr bgcolor="cccccc">
		<td colspan="2" style="height:1px;"></td>
	</tr>
	<tr><td colspan="2">&nbsp;</td></tr>
	
	
</table>
</div>

<table align="center">
	<tr><td>&nbsp;</td></tr>
	<tr align="center" valign="middle">
		<td colspan="5">
			<font size=2>
			
			<%
				if(Mem_Nick.equals("admin")){
			%>
			<a href="./BoardReplyAction.bo?ID=<%=board.getID()%>&number=3" class="black">
			<img alt="" src="<%=request.getContextPath() %>/photo/img/Mybold_As.png">
			<%} %>
			
			<%
				if(boardList != null){
				for(int i=0;i<boardList.size();i++){
				BoardBean b1=(BoardBean)boardList.get(i);
				
			%>
			<% 
				}}
			%>
	
			</a>&nbsp;&nbsp;
			<a href="./BoardModify.bo?ID=<%=board.getID() %>&number=<%=number%>" class="black">
			<img alt="" src="<%=request.getContextPath() %>/photo/img/Mybold_Modi.png">
			</a>&nbsp;&nbsp;
			<a href="./BoardDelete.bo?ID=<%=board.getID()%>&number=<%=number%>" class="black">
			<img alt="" src="<%=request.getContextPath()%>/photo/img/Mybold_Dl.png">
			</a>&nbsp;&nbsp;
			<a href="./BoardList.bo?number=<%=number%>" class="black"><img alt="" src="<%=request.getContextPath() %>/photo/img/Mybold_List.png"></a>&nbsp;&nbsp;
			</font>
		</td>
	</tr>
</table>
<!-- 게시판 수정 -->
</body>
</html>